package main

import (
	"fmt"
	"github.com/golang/protobuf/proto"
	"github.com/golang/protobuf/ptypes/wrappers"
	"github.com/valyala/fasthttp"
)

func main() {

	var msg, _ = proto.Marshal(&wrappers.Int32Value{Value: 1001})

	var req fasthttp.Request
	req.SetRequestURI("http://127.0.0.1:10001/Chat/ServerChats")
	req.Header.Add("Token", "05c76b3f5847d9caae5c5855edb3ee31")
	req.SetBody(msg)
	req.Header.SetContentType("application/protobuf")
	req.Header.SetMethod("POST")

	var resp fasthttp.Response

	var err = fasthttp.Do(&req, &resp)
	if err != nil {
		panic(err)
	}

	fmt.Println(resp.Header.String())

}
